home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / DiskUtil / Misc / BTNTape.lha / src / btn.h < prev    next >
Text File  |  1994-04-03  |  2KB  |  50 lines

  1. /* BTNtape include file, version 3.0 */
  2.  
  3. /* Operations supported by TapeIO */
  4. #define TSENSE  0    /* request sense */
  5. #define TREADY  1    /* test unit ready */
  6. #define TREAD   2    /* read blocks */
  7. #define TWRITE  3    /* write blocks */
  8. #define TREWIND 4    /* rewind tape */
  9. #define WFMARK  5    /* write file mark */
  10. #define TSKIPF  6    /* skip over files */
  11. #define TSKIPE  7    /* skip to end of data */
  12. #define TRETEN  8    /* retension tape */
  13. #define TEJECT  9    /* eject tape */
  14. #define INQUIRY 10   /* read device info */
  15. #define MDSET   11   /* mode-set */
  16. #define MDSNS   12   /* mode-sense */
  17. #define USRMODE 13   /* user mode-set */
  18. #define RDCAP   14   /* read capacity */
  19. #define RAWCMD  15   /* send user scsi command to tape */
  20. #define TFINISH 16   /* wait for last operation to finish */
  21.  
  22. /* these control how fast TapeIO returns to the caller */
  23. #define CTLWAIT 0    /* return when operation is done */
  24. #define CTLIMM  1    /* return immediately */
  25.  
  26. #define FAKEOM 99    /* special return code for DAC EOM */
  27.  
  28. /* Supported device types (from INQUIRY) */
  29. #define SEQ    (inq[0]==0x01) /* sequential */
  30. #define DAC    (inq[0]==0x10) /* direct-access */
  31. #define BADLUN (inq[0]==0x7f) /* oops */
  32.  
  33. #define PKTADR(Z)   (struct DosPacket *)Z->mn_Node.ln_Name
  34.  
  35. /* function prototypes */
  36. void _main(char*);
  37. long  TapeIO(int,long,int);
  38. int   DoSense(long);
  39. int   postape(int,int,long);
  40. long  wrteot(int,int,long);
  41. void  freestuff(void);
  42. int   getstart(long *);
  43. void  Mprintf(char *, ...);
  44. void  toUPPER(char *);
  45. void  swapbytes(char *);
  46. long  NewTape(void);
  47. long  ask(char *, char *, char *);
  48. void  returnpkt(ULONG, ULONG);
  49.  
  50.